<template>
  <view class="collapse-content">
    <view>
      <view class="g"></view>
      <view class="flex-column" v-for="(item, index) in data.leaderTalkList" :key="index">
        <view class="lg-jh">
          <view>领导：</view>
          <view>{{ item.userName }}</view>
        </view>
        <view class="lg-jh">
          <view>提交时间：</view>
          <view>{{ meetingTime(item.handleDateTime) }}</view>
        </view>
        <view class="lg-jh">
          <view>领导讲话：</view>
          <view>{{ item.handleContent }}</view>
        </view>
      </view>
    </view>
  </view>
</template>
<script>
import dayjs from 'dayjs'
export default {
  props: {
    data: {
      type: Object,
      default: () => ({}),
    }
  },
  computed: {
    meetingTime() {
      return function (time) {
        return time ? dayjs(time).format('YYYY/MM/DD HH:mm') : time
      }
    },
  },
}
</script>
<style lang="scss" scoped>
.collapse-content {
  padding-left: 30rpx;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  & > view > view {
    background: #fff;
    padding: 24rpx 0;
    width: 100%;
    display: flex;
    align-items: flex-start;
    font-size: 28rpx;
    font-family: PingFang SC-Regular, PingFang SC;
    font-weight: 400;
    color: #333333;
    // border-bottom: 1rpx solid #d5d7e3;
    & view:last-child {
      flex: 1;
      word-break: break-all;
      color: #666666;
      width: 100%;
    }
  }
  & > view > view:last-child {
    border: 0;
  }
  & > view > .g {
    height: 20rpx;
    background: rgb(245, 245, 245);
    position: relative;
    left: -30rpx;
    width: 100vw;
    padding: 0;
    margin: 0;
  }
}
.flex-column {
  flex-direction: column;
  border-bottom: 1rpx solid #d5d7e3;
  &:last-child {
    border: none;
  }
}
.lg-jh {
  box-sizing: border-box;
  display: flex;
  > view:first-child {
    color: #333;
    border: 0;
    width: 70px;
    text-align: right;
    margin-bottom: 6px;
  }
  > view:last-child {
    color: #666;
    flex: 1;
    word-break: break-all;
    width: 100%;
  }
}
</style>
